/**
 * @projectName 简陋的工作台
 * @package com.wzl.workbench.model
 * @className com.wzl.workbench.model.Work
 * @copyright Copyright 2021 Thunisoft, Inc. All rights reserved.
 */
package com.wzl.workbench.model;

import javax.persistence.Column;
import javax.persistence.Table;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
import lombok.ToString;
import lombok.experimental.SuperBuilder;
import com.wzl.workbench.common.BaseEntity;
import java.time.LocalDateTime;
import org.springframework.format.annotation.DateTimeFormat;
import javax.validation.constraints.Size;
import com.wzl.workbench.validate.Validate;
import java.time.LocalDate;
import org.springframework.format.annotation.DateTimeFormat;


/**
 * Work
 *
 * @description 文章表实体
 * @author weizhilin
 * @date 2021年04月21日 15:00:31
 * @version 1.0.0
 **/
@ApiModel("文章表")
@Table(name="DB_WORKBENCH.T_WORK")    
@Getter
@Setter
@ToString
@SuperBuilder
@NoArgsConstructor
@AllArgsConstructor
public class Work extends BaseEntity{
    
    /**
     * serialVersionUID
     */
    private static final long serialVersionUID = 1L;
    
    /**
     * 父级主键
     */
    @ApiModelProperty("父级主键")
    @Column(name = "C_FATHER_BH", columnDefinition = "varchar(32)")
    @Size(max = 32, groups = {Validate.class}, message = "父级主键的最大长度为32")
    private String fatherBh;

    /**
     * 类型
     */
    @ApiModelProperty("类型")
    @Column(name = "C_TYPE", columnDefinition = "varchar(300)")
    @Size(max = 300, groups = {Validate.class}, message = "类型的最大长度为300")
    private String type;

    /**
     * 描述
     */
    @ApiModelProperty("描述")
    @Column(name = "C_DETAIL", columnDefinition = "varchar(300)")
    @Size(max = 300, groups = {Validate.class}, message = "描述的最大长度为300")
    private String detail;

    /**
     * 标题
     */
    @ApiModelProperty("标题")
    @Column(name = "C_TITLE", columnDefinition = "varchar(300)")
    @Size(max = 300, groups = {Validate.class}, message = "标题的最大长度为300")
    private String title;

    /**
     * 内容，json数据
     */
    @ApiModelProperty("内容，json数据")
    @Column(name = "LC_CONTENT", columnDefinition = "text")
    private String content;

    /**
     * 标题图，image网络地址
     */
    @ApiModelProperty("标题图，image网络地址")
    @Column(name = "C_IMAGE", columnDefinition = "varchar(300)")
    @Size(max = 300, groups = {Validate.class}, message = "标题图，image网络地址的最大长度为300")
    private String image;

    /**
     * 作者，作者Bh
     */
    @ApiModelProperty("作者，作者Bh")
    @Column(name = "C_AUTHOR", columnDefinition = "varchar(300)")
    @Size(max = 300, groups = {Validate.class}, message = "作者，作者Bh的最大长度为300")
    private String author;

    /**
     * 状态，全部完成、未完成、doing
     */
    @ApiModelProperty("状态，全部完成、未完成、doing")
    @Column(name = "C_STATUS", columnDefinition = "varchar(300)")
    @Size(max = 300, groups = {Validate.class}, message = "状态，全部完成、未完成、doing的最大长度为300")
    private String status;

    /**
     * 是否为文件夹，1-是，0-否
     */
    @ApiModelProperty("是否为文件夹，1-是，0-否")
    @Column(name = "C_DIR", columnDefinition = "varchar(300)")
    @Size(max = 300, groups = {Validate.class}, message = "是否为文件夹，1-是，0-否的最大长度为300")
    private String dir;

    /**
     * 发布人姓名，作者姓名
     */
    @ApiModelProperty("发布人姓名，作者姓名")
    @Column(name = "C_NAME", columnDefinition = "varchar(300)")
    @Size(max = 300, groups = {Validate.class}, message = "发布人姓名，作者姓名的最大长度为300")
    private String name;

    /**
     * 文件层级，文件层级，从0开始
     */
    @ApiModelProperty("文件层级，文件层级，从0开始")
    @Column(name = "N_INDEX")
    private Integer index;

    /**
     * 展示日期
     */
    @ApiModelProperty("展示日期")
    @Column(name = "D_RQ", columnDefinition = "date")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private LocalDate rq;

    /**
     * 最后修改方式，1、创建2、修改
     */
    @ApiModelProperty("最后修改方式，1、创建2、修改")
    @Column(name = "N_ZHXGFS")
    private Integer zhxgfs;

    /**
     * 创建人
     */
    @ApiModelProperty("创建人")
    @Column(name = "C_CJR", columnDefinition = "varchar(300)")
    @Size(max = 300, groups = {Validate.class}, message = "创建人的最大长度为300")
    private String cjr;

    /**
     * 最后修改人
     */
    @ApiModelProperty("最后修改人")
    @Column(name = "C_ZHXGR", columnDefinition = "varchar(300)")
    @Size(max = 300, groups = {Validate.class}, message = "最后修改人的最大长度为300")
    private String zhxgr;

    /**
     * 创建时间
     */
    @ApiModelProperty("创建时间")
    @Column(name = "DT_CJSJ", columnDefinition = "datetime")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime cjsj;

    /**
     * 最后修改时间
     */
    @ApiModelProperty("最后修改时间")
    @Column(name = "DT_ZHXGSJ", columnDefinition = "datetime")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime zhxgsj;

}